<?

define ("_OBJECT_SITE_PATH", dirname ($_SESSION["PHP_SELF"]));

set_include_path ($_SERVER["DOCUMENT_ROOT"] . ":" . get_include_path ());
set_include_path ($_SERVER["DOCUMENT_ROOT"] .
		"/:" . get_include_path ());
set_include_path ($_SERVER["DOCUMENT_ROOT"] .
		"/include:" . get_include_path ());
set_include_path ($_SERVER["DOCUMENT_ROOT"] .
		"/admin:" . get_include_path ());
set_include_path ($_SERVER["DOCUMENT_ROOT"] .
		"/admin/include:" . get_include_path ());

require_once ("main.include.inc");

global $_OBJECT_IFACE;
global $_GLOBAL_DBH;
global $_OBJECT_IFACE_DISPLAY;
global $_OBJECT_IFACE_PANEL;
global $_OBJECT_TABBING;

$_OBJECT_IFACE_PANEL = _app_create_iface_panel ();

$_OBJECT_IFACE_DISPLAY->insert_container ($_OBJECT_IFACE_PANEL);

list ($_OBJECT_IFACE_TABBING_CONTAINER, $_OBJECT_IFACE_TABBING,
	$_OBJECT_IFACE_TABBING_PANEL) = _app_create_tabbing_container (array (
		tc_tabbing_id=>"tc_projects_ctl"
));
$_OBJECT_IFACE_PANEL->insert_container ($_OBJECT_IFACE_TABBING_CONTAINER);
$_OBJECT_IFACE_TABBING_CONTAINER->insert_container ($_OBJECT_IFACE_TABBING);
$_OBJECT_IFACE_TABBING_CONTAINER->insert_container ($_OBJECT_IFACE_TABBING_PANEL);

if (!$_REQUEST["fs_tab"] || $_REQUEST["fs_tab"] == "main") {

	require_once ("fs_projects.inc");
} elseif ($_REQUEST["fs_tab"] == "tasks") {

	if ($_REQUEST["fs_tab_option"] == "fs_tasks") {

		require_once ("fs_tasks.inc");
	} else require_once ("lc_tasks.inc");
} elseif ($_REQUEST["fs_tab"] == "assignment") {

	if ($_REQUEST["fs_tab_option"] == "fs_assignment") {

		require_once ("fs_assignment.inc");
	} else require_once ("lc_assignment.inc");
} elseif ($_REQUEST["fs_tab"] == "phases") {

	if ($_REQUEST["fs_tab_option"] == "fs_phases") {

		require_once ("fs_phases.inc");
	} else require_once ("lc_phases.inc");
} elseif ($_REQUEST["fs_tab"] == "milestones") {

	if ($_REQUEST["fs_tab_option"] == "fs_milestones") {

		require_once ("fs_milestones.inc");
	} else require_once ("lc_milestones.inc");
} elseif ($_REQUEST["fs_tab"] == "users") {

	if ($_REQUEST["fs_tab_option"] == "fs_users") {

		require_once ("fs_users.inc");
	} else require_once ("lc_users.inc");
} elseif ($_REQUEST["fs_tab"] == "workgroups") {

	if ($_REQUEST["fs_tab_option"] == "fs_workgroups") {

		require_once ("fs_workgroups.inc");
	} else require_once ("lc_workgroups.inc");
} elseif ($_REQUEST["fs_tab"] == "outline") {

	require_once ("lc_outline.inc");
} elseif ($_REQUEST["fs_tab"] == "notes") {

	if ($_REQUEST["fs_tab_option"] == "fs_notes") {

		require_once ("fs_notes.inc");
	} else require_once ("lc_notes.inc");
}

if (isset($_REQUEST["project_id"]) && ($_REQUEST["project_id"] > 0))

	$_OBJECT_TABBING = _app_create_tabbing_object ( array (

	fs_tab_id => "fs_tab",
	fs_tab_key => "project_id",
	fs_tab_value => $_REQUEST["project_id"],
	fs_tab_default => "main",
	fs_tab_hide_one => true,
	fs_tabs => array (
		array (label=>"Project", fs_tab=>"main", wrapper=>"css_tab_project",
				options=>"fs_action=view"),
		array (label=>"Tasks", fs_tab=>"tasks", wrapper=>"css_tab_task",
				options=>"fs_action=view"),
		array (label=>"Assignement Tracking", fs_tab=>"assignment", wrapper=>"css_tab_tracking",
				options=>"fs_action=view"),
		array (label=>"Phases", fs_tab=>"phases", wrapper=>"css_tab_phase",
				options=>"fs_action=view"),
		array (label=>"Milestones", fs_tab=>"milestones", wrapper=>"css_tab_milestone",
				options=>"fs_action=view"),
		array (label=>"Users", fs_tab=>"users", wrapper=>"css_tab_users",
				row_split=>true,
				options=>"fs_action=view"),
		array (label=>"Workgroups", fs_tab=>"workgroups", wrapper=>"css_tab_workgroup",
				options=>"fs_action=view"),
		array (label=>"Project Outline", fs_tab=>"outline", wrapper=>"css_tab_outline",
				options=>"fs_action=view"),
		array (label=>"Notes", fs_tab=>"notes", wrapper=>"css_tab_note",
				options=>"fs_action=view"),
	),
));

$_OBJECT_IFACE_TABBING->insert_container ($_OBJECT_TABBING);

$_OBJECT_IFACE->show_container ();

?>
